using System.Web.UI.WebControls;

using SBPweb.Data;

namespace SBPweb.Controls.Web
{

	public delegate void EntityGridViewUpdateEventHandler(object sender, EntityGridViewUpdateEventArgs e);

	public class EntityGridViewUpdateEventArgs : GridViewUpdateEventArgs
	{

		#region Private field

		private Entity mEntity;
		private int mIndex;

		#endregion

		#region Constructor logic

		internal EntityGridViewUpdateEventArgs(int rowIndex, Entity entity)
			: base(rowIndex)
		{
			mIndex = rowIndex;
			mEntity = entity;
		}

		internal EntityGridViewUpdateEventArgs(GridViewUpdateEventArgs originalArgs, Entity entity)
			:base(originalArgs.RowIndex)
		{

		}

		#endregion

		#region Public properties

		public Entity RowEntity
		{
			get
			{
				return mEntity;
			}
			protected internal set
			{
				mEntity = value;
			}
		}

		#endregion

	}

}